"""应用配置信息"""

from decouple import config

DEBUG = True

# MySQL
DB_HOST = '127.0.0.1'
DB_PORT = 3306
DB_NAME = 'tornado_auth'

# LOGGING
LOGGING_LEVEL = 'DEBUG'

# Email
DEFAULT_SUBJECT = 'tornado_auth激活链接(activation link)'
DEFAULT_FROM_EMAIL = config('DEFAULT_FROM_EMAIL')
MAIL_PARAMS = {
    'TLS': config('EMAIL_USE_TLS'),
    'host': config('EMAIL_HOST'),
    'user': config('EMAIL_HOST_USER'),
    'password': config('EMAIL_HOST_PASSWORD'),
    'port': config('EMAIL_PORT')
}

# SITE
DOMAIN_NAME = 'tornado_auth.com'

# Token过期时间 - 五分钟
TOKEN_EXPIRED_TIME = 5 * 60
TOKEN_NAME = 'access'

# Cookie
COOKIE_SECRET = 'generate_your_random_key'
REGISTRATION_TOKEN_COOKIE_NAME = 'reg_token_key'
PASSWORD_RESET_TOKEN_COOKIE_NAME = 'pass_reset_token_key'
COOKIE_EXPIRED_DATE = 14

# JWT
JWT_EXPIRES = 5  # 分钟
JWT_TOKEN_PREFIX = 'Bearer'
